package repo

import (
	"context"
	"forum/internal/domain"
	"forum/internal/domain/vo"
)

type ArticleRepository interface {
	Update(ctx context.Context, uid int64, article domain.Article) error
	Save(ctx context.Context, uid int64, article domain.Article) (int64, error)
	Sync(ctx context.Context, uid int64, article domain.Article) (int64, error)
	GetAllByAuthorId(ctx context.Context, id int64, cursor vo.Page) ([]domain.Article, error)
	GetById(ctx context.Context, id int64) (domain.Article, error)
	SyncCache(ctx context.Context, art domain.Article)
	GetPubArticleById(ctx context.Context, id int64) (domain.Article, error)
	ListPub(ctx context.Context) ([]int64, error)
}
